import {
  myHttp
} from '../utils/request1.js'
// 登录
export const getTokenApi = (data) => myHttp('/users/wxlogin', 'post', data)

// 创建订单
export const creatOrder = (data) => myHttp('/my/orders/create', 'post', data)

// 订单支付（生成预支付订单）
export const prePay = (order_number) => myHttp('/my/orders/req_unifiedorder', 'post', {
  order_number
})

// 查询订支付单状态
export const chkOrder = (order_number) => myHttp('/my/orders/chkOrder', 'get', {
  order_number
})